20230322
[shlib.git] / doc / UM.txt.en_US / =2.3.3.term-term operation.txt
blob3e77063d7b28064645eb0dfc55aedf5c6ecc1e7e
4 # Colorful display
5 ==============
7     there are many defination in term.shlib for color value. use those variable embedded into display string.
8 ```
9     dbgout "it ${FCBLACK} is ${FCRED} a ${FCGREEN} colorful ${FCYELLOW} string ${FCBLUE} for ${FCMAGENTA} this ${FCCYAN} example.${FCWHITE}\n"
10     
11 ```
12    
14 # Term size
15 =========
17     term size is grabed by stty size in cmd line. it is packaged to some functions.
18 @ term_get_screen_width ()
19 @ term_get_screen_height ()
20 @ term_get_screen_size ()
21 @ term_get_tty_width ()
22 @ term_get_tty_height ()
23 @ term_get_tty_size ()
24 @ term_set_screen_size ()
25     there are two types of term. one is tty device, and the other one is actual terminal display device.
26     tty device is a logical device. if the input cmd string from user is overlimit the tty width, it insert a newline automatically.
27     sometimes, tty size is not matched with terminal device, you will see the cmd line string change to a newline automatically when the cursor isn't reach the right side of the terminal.
30 # Cursor
31 =======
33     developer can use those functions for cursor operation.
34 @ cursor_get_pos ()
35 @ cursor_get_y_pos ()
36 @ cursor_get_x_pos ()
37 @ cursor_move_to ()
38 @ cursor_save_pos ()
39 @ cursor_restore_pos ()
40 @ cursor_clear_to_tail ()
41 @ cursor_clear_to_front ()
42     those functions is a wrap of tput cmd, but the cursor_get_pos(). it use orignal escape code to communication with terminal device.
43 https://vt100.net/docs/vt3xx-gp/contents.html
44     reference form this document, there are many escape cmd code for more featrues in vtxxx terminal device.
45     
48 # Short-key
49 =========
51     it's not implemented yet.
54
55 ==========